package com.mxprojects.constructors
{
	public class Link
	{
		public static function create(text:String, linkEventVariable:String, colour:uint = 0x2667A8, bold:Boolean = false, underline:Boolean = true):String {
			
			//build a string that we can use for clicking and such
			var linkString:String = "<a href=\"event:"+linkEventVariable+"\"><font color=\"#"+colour.toString(16)+"\">";
			
			if(underline){
				linkString += "<u>";
			}
			
			if(bold){
				linkString += "<b>";
			}
			
			//add the text
			linkString += text;
			
			if(bold){
				linkString += "</b>";
			}
			
			if(underline){
				linkString += "</u>";
			}
			
			//finish it off
			linkString += "</font></a>";
			
			return linkString;
		}

	}
}